#include "memorydll.h"

void TestMemoryLimits(MemoryAllocation alloctype)
{
    std::vector<VECTOR3FARRAY> t_Mems;
    std::vector<VECTOR3FARRAY>* p_Mems = nullptr;
    std::vector<VECTOR3FARRAY>* h_Mems = nullptr;

    switch (alloctype)
    {
    case MemoryAllocation::MA_STATIC:
        p_Mems = &s_Mems;
        break;
    case MemoryAllocation::MA_STACK:
        p_Mems = &t_Mems;
        break;
    case MemoryAllocation::MA_HEAP:
        h_Mems = new std::vector<VECTOR3FARRAY>();
        p_Mems = h_Mems;
        break;
    default:
        break;
    }

    for (size_t i = 0; i < COUNT; ++i)
    {
        VECTOR3FARRAY x;
        p_Mems->push_back(x);
    }

    if (h_Mems != nullptr)
        delete h_Mems;
}